<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>全局组件</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="app">
         <zwt>
            <div slot="a">aaaaa</div>
            <div slot="b">bbbbb</div>
            <div slot="c">ccccc</div>
            <div slot="d">ddddd</div>
         </zwt>
    </div >

    <template id="temp1" >
        <div>
            <slot name="a"></slot>
            <p>这里是个段落标签1</p>
            <slot name="b"></slot>
            <p>这里是个段落标签2</p>
            <slot name="c"></slot>
            <p>这里是个段落标签3</p>
            <slot name="d"></slot>
        </div>
    </template>

    <script> 
         
        var app = new Vue({
            el:'#app'
            ,components:{
                'zwt':{
                    template:'#temp1'
                }
            }
        });

    </script>
</body>
</html>
